x86/HVM: bound number of pinned cache attribute regions
authorJan Beulich <jbeulich@suse.com>
Tue, 21 Mar 2023 12:01:01 +0000 (12:01 +0000)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 Mar 2023 12:07:42 +0000 (12:07 +0000)
commitd0cb66d59a956ccba3dbe794f4ec01e4a4269ee9
tree6b0d29df9cf7e2607a0cfd42a4b2870b878a8d01
parentf8f8f07880d3817fc7b0472420eca9fecaa55358
x86/HVM: bound number of pinned cache attribute regions

This is exposed via DMOP, i.e. to potentially not fully privileged
device models. With that we may not permit registration of an (almost)
unbounded amount of such regions.

This is CVE-2022-42333 / part of XSA-428.

Fixes: 642123c5123f ("x86/hvm: provide XEN_DMOP_pin_memory_cacheattr")
Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Andrew Cooper <andrew.cooper3@citrix.com>
(cherry picked from commit a5e768640f786b681063f4e08af45d0c4e91debf)
xen/arch/x86/hvm/mtrr.c